home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / commandhandler / nsIControllerCommand.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  7KB  |  157 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIControllerCommand.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIControllerCommand_h__
  6. #define __gen_nsIControllerCommand_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. #ifndef __gen_nsICommandParams_h__
  14. #include "nsICommandParams.h"
  15. #endif
  16.  
  17. /* For IDL files that don't want to include root IDL files. */
  18. #ifndef NS_NO_VTABLE
  19. #define NS_NO_VTABLE
  20. #endif
  21.  
  22. /* starting interface:    nsIControllerCommand */
  23. #define NS_ICONTROLLERCOMMAND_IID_STR "0eae9a46-1dd2-11b2-aca0-9176f05fe9db"
  24.  
  25. #define NS_ICONTROLLERCOMMAND_IID \
  26.   {0x0eae9a46, 0x1dd2, 0x11b2, \
  27.     { 0xac, 0xa0, 0x91, 0x76, 0xf0, 0x5f, 0xe9, 0xdb }}
  28.  
  29. /**
  30.  * nsIControllerCommand
  31.  *
  32.  * A generic command interface. You can register an nsIControllerCommand
  33.  * with the nsIControllerCommandTable.
  34.  */
  35. class NS_NO_VTABLE nsIControllerCommand : public nsISupports {
  36.  public: 
  37.  
  38.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICONTROLLERCOMMAND_IID)
  39.  
  40.   /**
  41.    * Returns true if the command is currently enabled. An nsIControllerCommand
  42.    * can implement more than one commands; say, a group of related commands
  43.    * (e.g. delete left/delete right). Because of this, the command name is
  44.    * passed to each method.
  45.    *
  46.    * @param aCommandName  the name of the command for which we want the enabled
  47.    *                      state.
  48.    * @param aCommandContext    a cookie held by the nsIControllerCommandTable,
  49.    *                  allowing the command to get some context information.
  50.    *                  The contents of this cookie are implementation-defined.
  51.    */
  52.   /* boolean isCommandEnabled (in string aCommandName, in nsISupports aCommandContext); */
  53.   NS_IMETHOD IsCommandEnabled(const char *aCommandName, nsISupports *aCommandContext, PRBool *_retval) = 0;
  54.  
  55.   /* void getCommandStateParams (in string aCommandName, in nsICommandParams aParams, in nsISupports aCommandContext); */
  56.   NS_IMETHOD GetCommandStateParams(const char *aCommandName, nsICommandParams *aParams, nsISupports *aCommandContext) = 0;
  57.  
  58.   /**
  59.    * Execute the name command.
  60.    *
  61.    * @param aCommandName  the name of the command to execute.
  62.    * 
  63.    * @param aCommandContext    a cookie held by the nsIControllerCommandTable,
  64.    *                  allowing the command to get some context information.
  65.    *                  The contents of this cookie are implementation-defined.
  66.    */
  67.   /* void doCommand (in string aCommandName, in nsISupports aCommandContext); */
  68.   NS_IMETHOD DoCommand(const char *aCommandName, nsISupports *aCommandContext) = 0;
  69.  
  70.   /* void doCommandParams (in string aCommandName, in nsICommandParams aParams, in nsISupports aCommandContext); */
  71.   NS_IMETHOD DoCommandParams(const char *aCommandName, nsICommandParams *aParams, nsISupports *aCommandContext) = 0;
  72.  
  73. };
  74.  
  75. /* Use this macro when declaring classes that implement this interface. */
  76. #define NS_DECL_NSICONTROLLERCOMMAND \
  77.   NS_IMETHOD IsCommandEnabled(const char *aCommandName, nsISupports *aCommandContext, PRBool *_retval); \
  78.   NS_IMETHOD GetCommandStateParams(const char *aCommandName, nsICommandParams *aParams, nsISupports *aCommandContext); \
  79.   NS_IMETHOD DoCommand(const char *aCommandName, nsISupports *aCommandContext); \
  80.   NS_IMETHOD DoCommandParams(const char *aCommandName, nsICommandParams *aParams, nsISupports *aCommandContext); 
  81.  
  82. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  83. #define NS_FORWARD_NSICONTROLLERCOMMAND(_to) \
  84.   NS_IMETHOD IsCommandEnabled(const char *aCommandName, nsISupports *aCommandContext, PRBool *_retval) { return _to IsCommandEnabled(aCommandName, aCommandContext, _retval); } \
  85.   NS_IMETHOD GetCommandStateParams(const char *aCommandName, nsICommandParams *aParams, nsISupports *aCommandContext) { return _to GetCommandStateParams(aCommandName, aParams, aCommandContext); } \
  86.   NS_IMETHOD DoCommand(const char *aCommandName, nsISupports *aCommandContext) { return _to DoCommand(aCommandName, aCommandContext); } \
  87.   NS_IMETHOD DoCommandParams(const char *aCommandName, nsICommandParams *aParams, nsISupports *aCommandContext) { return _to DoCommandParams(aCommandName, aParams, aCommandContext); } 
  88.  
  89. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  90. #define NS_FORWARD_SAFE_NSICONTROLLERCOMMAND(_to) \
  91.   NS_IMETHOD IsCommandEnabled(const char *aCommandName, nsISupports *aCommandContext, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsCommandEnabled(aCommandName, aCommandContext, _retval); } \
  92.   NS_IMETHOD GetCommandStateParams(const char *aCommandName, nsICommandParams *aParams, nsISupports *aCommandContext) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCommandStateParams(aCommandName, aParams, aCommandContext); } \
  93.   NS_IMETHOD DoCommand(const char *aCommandName, nsISupports *aCommandContext) { return !_to ? NS_ERROR_NULL_POINTER : _to->DoCommand(aCommandName, aCommandContext); } \
  94.   NS_IMETHOD DoCommandParams(const char *aCommandName, nsICommandParams *aParams, nsISupports *aCommandContext) { return !_to ? NS_ERROR_NULL_POINTER : _to->DoCommandParams(aCommandName, aParams, aCommandContext); } 
  95.  
  96. #if 0
  97. /* Use the code below as a template for the implementation class for this interface. */
  98.  
  99. /* Header file */
  100. class nsControllerCommand : public nsIControllerCommand
  101. {
  102. public:
  103.   NS_DECL_ISUPPORTS
  104.   NS_DECL_NSICONTROLLERCOMMAND
  105.  
  106.   nsControllerCommand();
  107.  
  108. private:
  109.   ~nsControllerCommand();
  110.  
  111. protected:
  112.   /* additional members */
  113. };
  114.  
  115. /* Implementation file */
  116. NS_IMPL_ISUPPORTS1(nsControllerCommand, nsIControllerCommand)
  117.  
  118. nsControllerCommand::nsControllerCommand()
  119. {
  120.   /* member initializers and constructor code */
  121. }
  122.  
  123. nsControllerCommand::~nsControllerCommand()
  124. {
  125.   /* destructor code */
  126. }
  127.  
  128. /* boolean isCommandEnabled (in string aCommandName, in nsISupports aCommandContext); */
  129. NS_IMETHODIMP nsControllerCommand::IsCommandEnabled(const char *aCommandName, nsISupports *aCommandContext, PRBool *_retval)
  130. {
  131.     return NS_ERROR_NOT_IMPLEMENTED;
  132. }
  133.  
  134. /* void getCommandStateParams (in string aCommandName, in nsICommandParams aParams, in nsISupports aCommandContext); */
  135. NS_IMETHODIMP nsControllerCommand::GetCommandStateParams(const char *aCommandName, nsICommandParams *aParams, nsISupports *aCommandContext)
  136. {
  137.     return NS_ERROR_NOT_IMPLEMENTED;
  138. }
  139.  
  140. /* void doCommand (in string aCommandName, in nsISupports aCommandContext); */
  141. NS_IMETHODIMP nsControllerCommand::DoCommand(const char *aCommandName, nsISupports *aCommandContext)
  142. {
  143.     return NS_ERROR_NOT_IMPLEMENTED;
  144. }
  145.  
  146. /* void doCommandParams (in string aCommandName, in nsICommandParams aParams, in nsISupports aCommandContext); */
  147. NS_IMETHODIMP nsControllerCommand::DoCommandParams(const char *aCommandName, nsICommandParams *aParams, nsISupports *aCommandContext)
  148. {
  149.     return NS_ERROR_NOT_IMPLEMENTED;
  150. }
  151.  
  152. /* End of implementation class template. */
  153. #endif
  154.  
  155.  
  156. #endif /* __gen_nsIControllerCommand_h__ */
  157.